package com.huitu.whht.base.core.api.gb.tablewh;

import com.huitu.api.rest.AbstractApiResource;
import com.huitu.commons.PageUtils;
import com.huitu.whht.api.core.common.response.ApiResultBuilder;
import com.huitu.whht.api.core.common.annotations.SzyCoreApiResource;
import com.huitu.whht.api.core.common.annotations.SzyCoreApiService;
import com.huitu.whht.api.core.common.response.StatusRespBuilder;

import com.huitu.whht.base.core.api.gb.tablewh.entities.GbTablewh;

import com.huitu.whht.base.core.api.gb.tablewh.entities.GbTablewhQo;
import com.huitu.whht.base.core.api.gb.tablewh.service.IGbTablewhService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

/**
 * 说明: 公报表的列维护信息表API,表名称: T_WHHT_GB_TABLEWH <br/>
 * 日期: 2019-04-15
 * @author LiuCW
 */
@Component
@SzyCoreApiResource
@Path("gb/tablewh")
public class GbTablewhResource extends AbstractApiResource {

    private static final Logger LOGGER = LoggerFactory.getLogger(GbTablewhResource.class);

    private static final String UUID = "6e1370e1-2b68-443e-a6b5-f9cfec39737f";

    @Override
    public String getUUID() {
        return UUID;
    }

    @Autowired
    @SzyCoreApiService
    IGbTablewhService gbTablewhService;

    /**
     * @api {get} gb/tablewh/{whcd} [R][G]根据主键查询
     * @apiDescription [G]根据主键查询T_WHHT_GB_TABLEWH(公报表的列维护信息表)数据
     * @apiName (generate)select by primary key
     * @apiGroup GB_TABLEWH-公报表的列维护信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest gb/tablewh/7a0c8686fcc74e38868c4d3de6c6ba79
     * @apiParam   {String}         whcd               【必须】主键ID
     * @apiSuccess {String}         whcd               主键ID
     * @apiSuccess {String}         gbTable            公报表名
     * @apiSuccess {String}         gbColumn           公报表列
     * @apiSuccess {String}         gbColumnNm         公报表列名
     * @apiSuccess {String}         bt                 列ID
     * @apiSuccess {String}         pbt                父列ID
     * @apiSuccess {String}         gbcStatus          1：需要展示数据的最终列,0：跟1相反
     * @apiSuccess {Double}         columnNo           列的排序
     * @apiSuccess {String}         nt                 备注
     * @apiSuccess {Double}         colspan            列合并数
     * @apiSuccess {Double}         rowspan            行合并数
     * @apiSuccess {Double}         jb                 列级别
     * @apiSuccess {String}         datatype           同mybatis的映射文件数据类型
     * @apiSuccess {String}         rule               有值代表为具有计算规则的列且此列不可编辑，值为：对应的列值相互计算；例如：列名+列名或列名*列名
     * @apiSuccessExample 请求成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "whcd": "7a0c8686fcc74e38868c4d3de6c6ba79",
     * "gbTable": "T_WHHT_GB_SLGC_GSLTCB",
     * "gbColumn": "CZSH_GSL",
     * "gbColumnNm": "城镇生活",
     * "bt": "20",
     * "pbt": "7",
     * "gbcStatus": "1",
     * "columnNo": 20,
     * "nt": null,
     * "colspan": 1,
     * "rowspan": 1,
     * "jb": 3,
     * "datatype": "NUMERIC",
     * "rule": null
     *  }
     * }
     * @apiUse exceptions
     */
    @GET
    @Path("{whcd}")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response selectByPrimaryKey(@PathParam("whcd") String whcd) {
        LOGGER.info("根据主键查询 公报表的列维护信息表,参数 whcd:{}", whcd);
        return Response.ok(ApiResultBuilder.create(this, gbTablewhService.selectByPrimaryKey(whcd))).build();
    }

    /**
     * @api {post} gb/tablewh/list [R][G]根据条件查询
     * @apiDescription [G]根据条件查询T_WHHT_GB_TABLEWH(公报表的列维护信息表)数据
     * @apiName (generate)select by filter
     * @apiGroup GB_TABLEWH-公报表的列维护信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest gb/tablewh/list
     * @apiParam   {String}         whcd               主键ID
     * @apiParam   {String}         gbTable            公报表名
     * @apiParam   {String}         gbColumn           公报表列
     * @apiParam   {String}         gbColumnNm         公报表列名
     * @apiParam   {String}         bt                 列ID
     * @apiParam   {String}         pbt                父列ID
     * @apiParam   {List(String)}   gbcStatusList      (数组)1：需要展示数据的最终列,0：跟1相反
     * @apiParam   {Double}         columnNoMin        (最小)列的排序
     * @apiParam   {Double}         columnNoMax        (最大)列的排序
     * @apiParam   {String}         nt                 备注
     * @apiParam   {Double}         colspanMin         (最小)列合并数
     * @apiParam   {Double}         colspanMax         (最大)列合并数
     * @apiParam   {Double}         rowspanMin         (最小)行合并数
     * @apiParam   {Double}         rowspanMax         (最大)行合并数
     * @apiParam   {Double}         jbMin              (最小)列级别
     * @apiParam   {Double}         jbMax              (最大)列级别
     * @apiParam   {String}         datatype           同mybatis的映射文件数据类型
     * @apiParam   {String}         rule               有值代表为具有计算规则的列且此列不可编辑，值为：对应的列值相互计算；例如：列名+列名或列名*列名
     * @apiSuccess {String}         whcd               主键ID
     * @apiSuccess {String}         gbTable            公报表名
     * @apiSuccess {String}         gbColumn           公报表列
     * @apiSuccess {String}         gbColumnNm         公报表列名
     * @apiSuccess {String}         bt                 列ID
     * @apiSuccess {String}         pbt                父列ID
     * @apiSuccess {String}         gbcStatus          1：需要展示数据的最终列,0：跟1相反
     * @apiSuccess {Double}         columnNo           列的排序
     * @apiSuccess {String}         nt                 备注
     * @apiSuccess {Double}         colspan            列合并数
     * @apiSuccess {Double}         rowspan            行合并数
     * @apiSuccess {Double}         jb                 列级别
     * @apiSuccess {String}         datatype           同mybatis的映射文件数据类型
     * @apiSuccess {String}         rule               有值代表为具有计算规则的列且此列不可编辑，值为：对应的列值相互计算；例如：列名+列名或列名*列名
     * @apiSuccessExample 请求成功:
     * HTTP/1.1 200 OK
     * {
     * "result": [{
     * "whcd": "7a0c8686fcc74e38868c4d3de6c6ba79",
     * "gbTable": "T_WHHT_GB_SLGC_GSLTCB",
     * "gbColumn": "CZSH_GSL",
     * "gbColumnNm": "城镇生活",
     * "bt": "20",
     * "pbt": "7",
     * "gbcStatus": "1",
     * "columnNo": 20,
     * "nt": null,
     * "colspan": 1,
     * "rowspan": 1,
     * "jb": 3,
     * "datatype": "NUMERIC",
     * "rule": null
     *  }]
     * }
     *
     * @apiSuccessExample 分页请求:
     * request header: Rang={max=50;size=50;field=TS DESC}
     * HTTP/1.1 200 OK
     * {
     * "result": [{
     * "whcd": "7a0c8686fcc74e38868c4d3de6c6ba79",
     * "gbTable": "T_WHHT_GB_SLGC_GSLTCB",
     * "gbColumn": "CZSH_GSL",
     * "gbColumnNm": "城镇生活",
     * "bt": "20",
     * "pbt": "7",
     * "gbcStatus": "1",
     * "columnNo": 20,
     * "nt": null,
     * "colspan": 1,
     * "rowspan": 1,
     * "jb": 3,
     * "datatype": "NUMERIC",
     * "rule": null
     *  }],
     * "paging": {
     * "count": 3,
     * "total": 120,
     * "finale": false,
     * "index": 1
     * }
     * }
     * @apiUse header_rang
     * @apiUse exceptions
     */
    @POST
    @Path("list")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response selectList(GbTablewhQo filter) {
        PageUtils.startPageFromRang();
        LOGGER.info("根据条件查询 公报表的列维护信息表,参数 GbTablewhQo:{}", filter);
        return Response.ok(ApiResultBuilder.create(this, gbTablewhService.selectList(filter))).build();
    }

    /**
     * @api {put} gb/tablewh [C][G]新增数据
     * @apiPrivate
     * @apiDescription [G]新增T_WHHT_GB_TABLEWH(公报表的列维护信息表)数据
     * @apiName (generate)add data
     * @apiGroup GB_TABLEWH-公报表的列维护信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         whcd               【必须】主键ID
     * @apiParam   {String}         gbTable            公报表名
     * @apiParam   {String}         gbColumn           公报表列
     * @apiParam   {String}         gbColumnNm         公报表列名
     * @apiParam   {String}         bt                 列ID
     * @apiParam   {String}         pbt                父列ID
     * @apiParam   {String}         gbcStatus          1：需要展示数据的最终列,0：跟1相反
     * @apiParam   {Double}         columnNo           列的排序
     * @apiParam   {String}         nt                 备注
     * @apiParam   {Double}         colspan            列合并数
     * @apiParam   {Double}         rowspan            行合并数
     * @apiParam   {Double}         jb                 列级别
     * @apiParam   {String}         datatype           同mybatis的映射文件数据类型
     * @apiParam   {String}         rule               有值代表为具有计算规则的列且此列不可编辑，值为：对应的列值相互计算；例如：列名+列名或列名*列名
     * @apiSuccess {Integer}        status             1:新增成功;0:新增失败.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据,通常包含新增数据的主键值
     * @apiSampleRequest gb/tablewh
     * @apiSuccessExample 新增成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":{
     *   "whcd": "7a0c8686fcc74e38868c4d3de6c6ba79"
     *      }
     *   }
     * }
     @apiSuccessExample 新增失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":{
     *   "whcd": "7a0c8686fcc74e38868c4d3de6c6ba79"
     *      }
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "whcd": "7a0c8686fcc74e38868c4d3de6c6ba79",
     * "gbTable": "T_WHHT_GB_SLGC_GSLTCB",
     * "gbColumn": "CZSH_GSL",
     * "gbColumnNm": "城镇生活",
     * "bt": "20",
     * "pbt": "7",
     * "gbcStatus": "1",
     * "columnNo": 20,
     * "nt": null,
     * "colspan": 1,
     * "rowspan": 1,
     * "jb": 3,
     * "datatype": "NUMERIC",
     * "rule": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response insert(GbTablewh record) {
        LOGGER.info("新增 公报表的列维护信息表,参数 GbTablewh:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.insert(gbTablewhService.insertSelective(record),record))).build();
    }

    /**
     * @api {post} gb/tablewh/insertBatch [C][G]批量新增数据
     * @apiPrivate
     * @apiDescription [G]批量新增T_WHHT_GB_TABLEWH(公报表的列维护信息表)数据
     * @apiName (generate)addBatch data
     * @apiGroup GB_TABLEWH-公报表的列维护信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         whcd               【必须】主键ID
     * @apiParam   {String}         gbTable            公报表名
     * @apiParam   {String}         gbColumn           公报表列
     * @apiParam   {String}         gbColumnNm         公报表列名
     * @apiParam   {String}         bt                 列ID
     * @apiParam   {String}         pbt                父列ID
     * @apiParam   {String}         gbcStatus          1：需要展示数据的最终列,0：跟1相反
     * @apiParam   {Double}         columnNo           列的排序
     * @apiParam   {String}         nt                 备注
     * @apiParam   {Double}         colspan            列合并数
     * @apiParam   {Double}         rowspan            行合并数
     * @apiParam   {Double}         jb                 列级别
     * @apiParam   {String}         datatype           同mybatis的映射文件数据类型
     * @apiParam   {String}         rule               有值代表为具有计算规则的列且此列不可编辑，值为：对应的列值相互计算；例如：列名+列名或列名*列名
     * @apiSuccess {Integer}        status             1:新增成功;0:新增失败.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据,通常包含新增数据的主键值
     * @apiSampleRequest gb/tablewh/insertBatch
     * @apiSuccessExample 新增成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":{
     *   "whcd": "7a0c8686fcc74e38868c4d3de6c6ba79"
     *      }
     *   }
     * }
     @apiSuccessExample 新增失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":{
     *   "whcd": "7a0c8686fcc74e38868c4d3de6c6ba79"
     *      }
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * [{
     * "whcd": "7a0c8686fcc74e38868c4d3de6c6ba79",
     * "gbTable": "T_WHHT_GB_SLGC_GSLTCB",
     * "gbColumn": "CZSH_GSL",
     * "gbColumnNm": "城镇生活",
     * "bt": "20",
     * "pbt": "7",
     * "gbcStatus": "1",
     * "columnNo": 20,
     * "nt": null,
     * "colspan": 1,
     * "rowspan": 1,
     * "jb": 3,
     * "datatype": "NUMERIC",
     * "rule": null
     * }]
     * @apiUse exceptions
     */
    @POST
    @Path("insertBatch")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response insertBatch(List<GbTablewh> recordList) {
        LOGGER.info("批量新增 公报表的列维护信息表,参数 GbTablewh:[]", recordList);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.insert(gbTablewhService.insertBatch(recordList),recordList))).build();
    }

    /**
     * @api {put} gb/tablewh/{whcd}/update [U][G]根据主键修改
     * @apiPrivate
     * @apiDescription [G]根据主键修改T_WHHT_GB_TABLEWH(公报表的列维护信息表)数据
     * @apiName (generate)update data
     * @apiGroup GB_TABLEWH-公报表的列维护信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         whcd               【必须】主键ID
     * @apiParam   {String}         gbTable            公报表名
     * @apiParam   {String}         gbColumn           公报表列
     * @apiParam   {String}         gbColumnNm         公报表列名
     * @apiParam   {String}         bt                 列ID
     * @apiParam   {String}         pbt                父列ID
     * @apiParam   {String}         gbcStatus          1：需要展示数据的最终列,0：跟1相反
     * @apiParam   {Double}         columnNo           列的排序
     * @apiParam   {String}         nt                 备注
     * @apiParam   {Double}         colspan            列合并数
     * @apiParam   {Double}         rowspan            行合并数
     * @apiParam   {Double}         jb                 列级别
     * @apiParam   {String}         datatype           同mybatis的映射文件数据类型
     * @apiParam   {String}         rule               有值代表为具有计算规则的列且此列不可编辑，值为：对应的列值相互计算；例如：列名+列名或列名*列名
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest gb/tablewh/7a0c8686fcc74e38868c4d3de6c6ba79/update
     * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "whcd": "7a0c8686fcc74e38868c4d3de6c6ba79",
     * "gbTable": "T_WHHT_GB_SLGC_GSLTCB",
     * "gbColumn": "CZSH_GSL",
     * "gbColumnNm": "城镇生活",
     * "bt": "20",
     * "pbt": "7",
     * "gbcStatus": "1",
     * "columnNo": 20,
     * "nt": null,
     * "colspan": 1,
     * "rowspan": 1,
     * "jb": 3,
     * "datatype": "NUMERIC",
     * "rule": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Path("{whcd}/update")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response update(@PathParam("whcd") String whcd, GbTablewh record) {
        record.setWhcd(whcd);
        LOGGER.info("根据主键修改 公报表的列维护信息表,参数 GbTablewh:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(gbTablewhService.updateByPrimaryKey(record)))).build();
    }

    /**
     * @api {put} gb/tablewh/{whcd}/update-selective [U][G]根据主键修改(只修改非null字段)
     * @apiPrivate
     * @apiDescription [G]根据主键修改T_WHHT_GB_TABLEWH(公报表的列维护信息表)数据,只修改非null字段
     * @apiName (generate)update selected data
     * @apiGroup GB_TABLEWH-公报表的列维护信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         whcd               主键ID
     * @apiParam   {String}         gbTable            公报表名
     * @apiParam   {String}         gbColumn           公报表列
     * @apiParam   {String}         gbColumnNm         公报表列名
     * @apiParam   {String}         bt                 列ID
     * @apiParam   {String}         pbt                父列ID
     * @apiParam   {String}         gbcStatus          1：需要展示数据的最终列,0：跟1相反
     * @apiParam   {Double}         columnNo           列的排序
     * @apiParam   {String}         nt                 备注
     * @apiParam   {Double}         colspan            列合并数
     * @apiParam   {Double}         rowspan            行合并数
     * @apiParam   {Double}         jb                 列级别
     * @apiParam   {String}         datatype           同mybatis的映射文件数据类型
     * @apiParam   {String}         rule               有值代表为具有计算规则的列且此列不可编辑，值为：对应的列值相互计算；例如：列名+列名或列名*列名
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest gb/tablewh/7a0c8686fcc74e38868c4d3de6c6ba79/update-selective
     * * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "whcd": "7a0c8686fcc74e38868c4d3de6c6ba79",
     * "gbTable": "T_WHHT_GB_SLGC_GSLTCB",
     * "gbColumn": "CZSH_GSL",
     * "gbColumnNm": "城镇生活",
     * "bt": "20",
     * "pbt": "7",
     * "gbcStatus": "1",
     * "columnNo": 20,
     * "nt": null,
     * "colspan": 1,
     * "rowspan": 1,
     * "jb": 3,
     * "datatype": "NUMERIC",
     * "rule": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Path("{whcd}/update-selective")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response updateSelective(@PathParam("whcd") String whcd, GbTablewh record) {
        record.setWhcd(whcd);
        LOGGER.info("根据主键修改(只修改非null字段) 公报表的列维护信息表,参数 GbTablewh:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(gbTablewhService.updateByPrimaryKeySelective(record)))).build();
    }

    /**
     * @api {post} gb/tablewh/updateBatch [U][G]根据主键批量修改(只修改非null字段)
     * @apiPrivate
     * @apiDescription [G]根据批量主键修改T_WHHT_GB_TABLEWH(公报表的列维护信息表)数据,只修改非null字段
     * @apiName (generate)updateBatch selected data
     * @apiGroup GB_TABLEWH-公报表的列维护信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         whcd               主键ID
     * @apiParam   {String}         gbTable            公报表名
     * @apiParam   {String}         gbColumn           公报表列
     * @apiParam   {String}         gbColumnNm         公报表列名
     * @apiParam   {String}         bt                 列ID
     * @apiParam   {String}         pbt                父列ID
     * @apiParam   {String}         gbcStatus          1：需要展示数据的最终列,0：跟1相反
     * @apiParam   {Double}         columnNo           列的排序
     * @apiParam   {String}         nt                 备注
     * @apiParam   {Double}         colspan            列合并数
     * @apiParam   {Double}         rowspan            行合并数
     * @apiParam   {Double}         jb                 列级别
     * @apiParam   {String}         datatype           同mybatis的映射文件数据类型
     * @apiParam   {String}         rule               有值代表为具有计算规则的列且此列不可编辑，值为：对应的列值相互计算；例如：列名+列名或列名*列名
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest  gb/tablewh/updateBatch
     * * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * [{
     * "whcd": "7a0c8686fcc74e38868c4d3de6c6ba79",
     * "gbTable": "T_WHHT_GB_SLGC_GSLTCB",
     * "gbColumn": "CZSH_GSL",
     * "gbColumnNm": "城镇生活",
     * "bt": "20",
     * "pbt": "7",
     * "gbcStatus": "1",
     * "columnNo": 20,
     * "nt": null,
     * "colspan": 1,
     * "rowspan": 1,
     * "jb": 3,
     * "datatype": "NUMERIC",
     * "rule": null
     * }]
     * @apiUse exceptions
     */
    @POST
    @Path("updateBatch")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response updateBatch(List<GbTablewh> record) {
        LOGGER.info("根据主键批量修改(只修改非null字段) 公报表的列维护信息表,参数 GbTablewh:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(gbTablewhService.updateBatch(record)))).build();
    }

    /**
     * @api {delete} gb/tablewh/{whcd} [D][G]根据主键删除
     * @apiPrivate
     * @apiDescription [G]根据主键删除T_WHHT_GB_TABLEWH(公报表的列维护信息表)数据
     * @apiName (generate)delete by primary key
     * @apiGroup GB_TABLEWH-公报表的列维护信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest gb/tablewh/7a0c8686fcc74e38868c4d3de6c6ba79
     * @apiParam   {String}         whcd               【必须】主键ID
     * @apiSuccess {Integer}        status             1:删除成功;0:要删除的数据不存在(可能已被删除).
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSuccessExample 删除成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 删除失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiUse exceptions
     */
    @DELETE
    @Path("{whcd}")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response delete(@PathParam("whcd") String whcd) {
        LOGGER.info("根据主键删除 公报表的列维护信息表,参数 whcd:{}", whcd);
        Integer rows = gbTablewhService.deleteByPrimaryKey(whcd);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.delete(rows))).build();
    }

    /**
     * @api {delete} gb/tablewh/by-filter [D][G]根据条件删除
     * @apiPrivate
     * @apiDescription [G]根据条件删除T_WHHT_GB_TABLEWH(公报表的列维护信息表)数据
     * @apiName (generate)delete by filter
     * @apiGroup GB_TABLEWH-公报表的列维护信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest gb/tablewh/by-filter
     * @apiParam   {String}         whcd               主键ID
     * @apiParam   {String}         gbTable            公报表名
     * @apiParam   {String}         gbColumn           公报表列
     * @apiParam   {String}         gbColumnNm         公报表列名
     * @apiParam   {String}         bt                 列ID
     * @apiParam   {String}         pbt                父列ID
     * @apiParam   {List(String)}   gbcStatusList      (数组)1：需要展示数据的最终列,0：跟1相反
     * @apiParam   {Double}         columnNoMin        (最小)列的排序
     * @apiParam   {Double}         columnNoMax        (最大)列的排序
     * @apiParam   {String}         nt                 备注
     * @apiParam   {Double}         colspanMin         (最小)列合并数
     * @apiParam   {Double}         colspanMax         (最大)列合并数
     * @apiParam   {Double}         rowspanMin         (最小)行合并数
     * @apiParam   {Double}         rowspanMax         (最大)行合并数
     * @apiParam   {Double}         jbMin              (最小)列级别
     * @apiParam   {Double}         jbMax              (最大)列级别
     * @apiParam   {String}         datatype           同mybatis的映射文件数据类型
     * @apiParam   {String}         rule               有值代表为具有计算规则的列且此列不可编辑，值为：对应的列值相互计算；例如：列名+列名或列名*列名
     * @apiSuccess {Integer}        status             通常1或者>1:删除成功;0:没有符合条件的数据.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSuccessExample 删除成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 删除失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiUse exceptions
     */
    @DELETE
    @Path("by-filter")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response deleteByFilter(GbTablewhQo filter) {
        LOGGER.info("根据条件删除 公报表的列维护信息表,参数 GbTablewhQo:{}", filter);
        Integer rows = gbTablewhService.deleteByFilter(filter);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.delete(rows))).build();
    }
}
